<?php

namespace app\common\model;

use think\Model;

class Type extends Model
{
    # 关联模型 关联spec表
    public function specs(){
        return $this->hasMany("spec","type_id","id");
    }
    # 关联模型 叛关联 attribute表
    public function Attribute(){
        return $this->hasMany("attribute","type_id","id");
    }
    public function goodsAttr(){
        return $this->hasMany("attribute","type_id","id");
    }
}
